package code.ws_common_net.code
{
	import code.ws_common_net.utils.ByteBuffer;
	
	
	public class NetConnectManager
	{
		private static var instance:NetConnectManager
		
		protected var connect:ClientSocket;
		public static function get getInstance():NetConnectManager
		{
			if(instance==null)
				instance=new NetConnectManager();
			return instance;
		}
		public function NetConnectManager()
		{
			init();
		}
		private function init():void
		{
			connect=new ClientSocket();
			connect.connectServer("localhost",9003);
		}
		public function send(data:ByteBuffer):void
		{
			connect.send(data);
		}
		public function close():void
		{
			connect.close();
		}
	}
}